package msr.frontend;

import java.util.logging.Logger;

import msr.service.OracleService;
public class LoginAction {
	private static final Logger log = Logger.getLogger(LoginAction.class
			.getName());
	private String username;
	private String passwd;
	private OracleService oService = new OracleService();

	public String execute() {
		log.info("username " + this.username + " and passwd " + this.passwd);
		boolean check = oService.isLogin(username, passwd);
		log.info("value of check " + check);
		if (check)
			// return Message.MSG001_SUCCESS;
			return "success";
		else
			// return Message.MSG001_FAULT;
			return "error";
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPasswd() {
		return passwd;
	}

	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}

}
